﻿<Page
    x:Class="Weather.MainPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Weather"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>


        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton"  IsEnabled="false" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="天气" Style="{StaticResource PageHeaderTextStyle}" Grid.Column="1"/>
        </Grid>
        
<!-- Horizontal scrolling grid used in most view states -->
        <FlipView x:Name="flipView" Grid.Row="1" Margin="0,0,0,0">
            <FlipViewItem TabIndex="0">
                <local:Day1Weather x:Name="day0Weather" Day="0" Margin="0,0,0,0" />
            </FlipViewItem>
            <FlipViewItem>
                <local:Day1Weather x:Name="day1Weather" Day="1" />
            </FlipViewItem>
            <FlipViewItem>
                <local:Day1Weather x:Name="day2Weather" Day="2"/>
            </FlipViewItem>
            <FlipViewItem>
                <local:Day1Weather x:Name="day3Weather" Day="3"/>
            </FlipViewItem>
            <FlipViewItem>
                <!--<local:Day1Weather x:Name="day4Weather" Day="4"/>-->
            </FlipViewItem>
        </FlipView>
        
        
    </Grid>
<Page.BottomAppBar>
        <AppBar x:Name="GlobalAppBar" Padding="10,0,10,0"  Margin="0,531,0,0">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50*"/>
                    <ColumnDefinition Width="50*"/>
                </Grid.ColumnDefinitions>
                <StackPanel x:Name="LeftCommands" Orientation="Horizontal" Grid.Column="0" HorizontalAlignment="Left">
                    <Button x:Name="Back" Tag="Refresh" Style="{StaticResource RefreshAppBarButtonStyle}" HorizontalAlignment="Left" Margin="0"/>
                </StackPanel>
                <StackPanel x:Name="RightCommands" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right">
                    <Button x:Name="btnAdd"  Tag="Add" Style="{StaticResource SearchAppBarButtonStyle}" Click="btnAdd_Click" Height="88" />
                    <Button x:Name="btnCity" Tag="City" Click="btnCity_Click">
                        <Button.Style>
                            <Style TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
                                <Setter Property="AutomationProperties.AutomationId" Value="FavoriteAppBarButton"/>
                                <Setter Property="AutomationProperties.Name" Value="City"/>
                                <Setter Property="Content" Value=""/>
                            </Style>
                        </Button.Style>
                    </Button>
                    <Button Style="{StaticResource HelpAppBarButtonStyle}"/>

                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>
</Page>
